package com.epoch.serviceconsumer.service;

import bean.response.ResponseBean;
import com.epoch.serviceconsumer.bean.Consumer;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;

/**
 * @author admin
 */
@Service
public interface ConsumerService {

    /**
     * search consumer by id
     * @param csId
     * @return consumer
     */
    ResponseBean getById(String csId);

    /**
     * get consumer by csPhone
     * @param csPhone
     * @return
     */
    Consumer getByCsPhone(String csPhone);

    /**
     * 用户信息完善
     * @param completeConsumer
     * @return
     */
    ResponseBean csInfoComplete(Consumer completeConsumer, HttpServletRequest httpServletRequest);

    /**
     * 用户修改密码
     * @param map
     * @return
     */
    ResponseBean changePwd(HashMap<String, String> map);

    /**
     * 通过csId删除用户
     * @param csId
     * @return
     */
//    ResponseBean delete(String csId);

    /**
     * 上传/修改头像
     * @param multipartFile
     * @param csId
     * @return
     */
    ResponseBean addPhoto(MultipartFile multipartFile, String csId, HttpServletResponse response);

    /**
     * 获取头像，通过csId
     * @param csId
     * @param response
     * @return
     */
    ResponseBean getPhoto(String csId, HttpServletResponse response);

    /**
     * 获取用户基本信息 用户管理
     * @return
     */
    ResponseBean getConsumerList();

    /**
     * 添加管理员
     * @param consumer
     * @return
     */
    ResponseBean addManager(Consumer consumer);

    /**
     * 修改用户的状态
     * @param map
     * @return
     */
    ResponseBean updateCsUseState(HashMap<String, Object> map);

    /**
     * 通过id删除用户
     * @param csId
     * @return
     */
    ResponseBean deleteCsByCsId(String csId);

}
